<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateGuildAccount extends Migration
{
    protected $connection = 'guild';

    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('guild_account', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->default(0)->comment('用户ID');
            $table->tinyInteger('type')->default(0)->comment('账户种类 1=银行卡 2=支付宝');
            $table->string('account', 30)->default('')->comment('账号');
            $table->string('real_name', 30)->default('')->comment('提款人(身份证姓名)');
            $table->string('id_card', 30)->default('')->comment('身份证号码');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('guild_account');
    }
}
